package org.ruiyichen.guizhou.agr.bean.mode;

import org.ruiyichen.guizhou.agr.imp.IIrrigatedDeviceFilter;

public class IIrrigatedDeviceModel implements IIrrigatedDeviceFilter {

    public boolean isSelect;

    public String irrigatedDeviceDesc;

    public boolean controlOpen;

    /**
     * 设备id
     */
    public String deviceId;
    /**
     * 基地id
     */
    public String baseId;
    /**
     * 地块id
     */
    public String landId;
    /**
     * 基地名称
     */
    public String baseName;
    /**
     * 地块名称
     */
    public String landName;
    /**
     * 灌区编码
     */
    public String irrigNumber;
    /**
     * MACid
     */
    public String macId;
    /**
     * 灌区id
     */
    public String irrigId;
    /**
     * 设备名称
     */
    public String deviceName;
    /**
     * 设备编码
     */
    public String deviceNumber;
    /**
     * 设备控制面积
     */
    public String deviceArea;
    /**
     * 设备类型
     */
    public String deviceType;
    /**
     * 设备位置
     */
    public String devicePosition;
    /**
     * 设备坐标
     */
    public String deviceCoordinate;
    /**
     * mac地址
     */
    public String macAddress;
    /**
     * 设备手动标识
     * 0:关(默认) 1:开启
     */
    public String deviceManual;
    /**
     * 删除标志
     */
    public String delFlag;
    /**
     * 设备状态
     */
    public String status;


    public IIrrigatedDeviceModel(boolean isSelect, String irrigatedDeviceDesc, boolean controlOpen) {
        this.isSelect = isSelect;
        this.irrigatedDeviceDesc = irrigatedDeviceDesc;
        this.controlOpen = controlOpen;
    }

    @Override
    public boolean isISelected() {
        return isSelect;
    }

    @Override
    public String getIIrrigatedDeviceDesc() {
        return deviceName;
    }

    @Override
    public void setISelected(boolean iSelected) {
        this.isSelect = iSelected;
    }

    @Override
    public boolean isIControlOpen() {
        return "1".equals(deviceManual);
    }

    @Override
    public void setIControlState(boolean isOpen) {
        this.controlOpen = isOpen;
    }

    @Override
    public String getIIrrigatedDeviceId() {
        return deviceId;
    }
}
